package co.fitstart.admin.dao;

import java.util.List;

import com.demo2do.core.persistence.annotation.Dynamic;
import com.demo2do.core.persistence.annotation.Execute;
import com.demo2do.core.persistence.annotation.Query;
import com.demo2do.core.persistence.annotation.Variable;

import co.fitstart.entity.courseware.CoursewareTag;
import co.fitstart.entity.courseware.FitnessTag;

@Dynamic("hibernate")
public interface FitnessTagDao {
    
    /**
     * 
     * @param ids
     * @return
     */
    @Query("FROM FitnessTag WHERE disabled = false AND id in (:ids)")
    public List<FitnessTag> list(@Variable("ids") List<Long> ids);
    
    /**
     * 
     * @param ids
     * @return
     */
    @Query("FROM CoursewareTag WHERE disabled = false AND id in (:ids)")
    public List<CoursewareTag> listCoursewareTag(@Variable("ids") List<Long> ids);
    
    /**
     * 
     * @param ids
     */
    @Execute("UPDATE CoursewareTag SET disabled = true WHERE id in (:ids)")
    public void deleteCoursewareTags(@Variable("ids") List<Long> ids);

}
